package entity;

import java.io.Serializable;
import java.util.List;

import javax.inject.Named;
import javax.persistence.CascadeType;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.OneToMany;

/**
 * Entity implementation class for Entity: Commissioned
 *
 */

@Named(value="commissioned")
@Entity
@DiscriminatorValue("T")
public class Commissioned extends Salaried implements Serializable {

	private float sales_percent;
	
	@OneToMany(mappedBy="commissioned",cascade=CascadeType.REMOVE)
	private List<SalesCard> salesCards;
	
	public Commissioned(String codfisc, String name, String surname, String username, String password,
			float sales_percent,float monthly_salary) {
		super(codfisc, name, surname, username, password,monthly_salary);
		this.sales_percent = sales_percent;
	}

	public float getSales_percent() {
		return sales_percent;
	}

	public void setSales_percent(int sales_percent) {
		this.sales_percent = sales_percent;
	}



	public List<SalesCard> getSalesCards() {
		return salesCards;
	}

	public void setSalesCards(List<SalesCard> salesCards) {
		this.salesCards = salesCards;
	}

	public void setSales_percent(float sales_percent) {
		this.sales_percent = sales_percent;
	}

	private static final long serialVersionUID = 1L;

	public Commissioned() {
		super();
	}
   
}
